package cn.swenty.backstage.framework.taglib;

import cn.swenty.backstage.framework.common.Global;
import cn.swenty.backstage.framework.util.ReflectHelper;

public class UserTag  extends SimpleTag{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String attr;
	

	public String getAttr() {
		return attr;
	}



	public void setAttr(String attr) {
		this.attr = attr;
	}


	protected String getPrintStr() throws Exception {
		Object o = ReflectHelper.getValueByFieldName(Global.getCurrentUser(), attr);
		if(o == null) return "";
		return o.toString();
	}

	
	
}
